{template 'common/header-gw'}
<ol class="breadcrumb">
    <li><a href="./?refresh"><i class="fa fa-home"></i></a></li>
    <li class="active">日志信息</li>
</ol>
<ul class="nav nav-tabs">
    <li class="active" ><a href="{php echo url('sms/logs/list');}">日志信息</a></li>
</ul>
<div class="panel panel-info " id="query">
    <div class="panel-heading">
        <a class="accordion-toggle" data-toggle="collapse" href="#collapseOne">
            筛选
        </a>
    </div>
    <div id="collapseOne"  class="panel-body panel-collapse collapse in ">
        <form action="{php echo url('sms/logs/list');}" method="post" class="form-horizontal " role="form">

            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 col-lg-1 control-label">用户名</label>
                <div class="col-sm-2">
                    <input type="text" name="username" class="form-control" placeholder="请输入用户名">
                </div>
                <label class="col-xs-12 col-sm-3 col-md-2 col-lg-1 control-label">模块</label>
                <div class="col-sm-2">
                    <select name="module" class="form-control">
                        <option value="0">不限</option>
                        {loop $modules $row}
                        <option value="{$row['id']}">{$row['title']}</option>
                        {/loop}
                    </select>
                </div>
                <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">操作</label>
                <div class="col-sm-2">
                    <select name="operate" class="form-control">
                        <option value="0" >不限</option>
                        {loop $op $row}
                        <option value="{$row['id']}">{$row['title']}</option>
                        {/loop}
                    </select>
                </div>
                <div class="pull-right col-xs-8 col-sm-2 col-lg-1">
                    <button class="btn btn-block"><i class="fa fa-search"></i> 搜索</button>
                </div>
            </div>
        </form>
    </div>
</div>
<div class="clearfix">
    <div class="table-responsive">
        <table class="table table-hover">
            <thead>
            <tr>
                <th style="width:100px;">用户名</th>
                <th style="width:90px;">模块</th>
                <th style="width:70px;">操作</th>
                <th style="width:70px;">简单描述</th>
                <th style="width:110px;">内容</th>
                <th style="width:110px;">创建时间</th>
            </tr>
            </thead>
            <tbody>
            {loop $list $row}
            <tr>
                <td>{$row['username']}</td>
                <td>{loop $modules $mod}{if $row['module']==$mod['id']}{php echo $mod['title'];}{/if}{/loop}</td>
                <td>{loop $op $op1}{if $row['operate']==$op1['id']}{php echo $op1['title'];}{/if}{/loop}</td>
                <td>{$row['desc']}</td>
                <td>{$row['content']}</td>
                <td>{php echo date('Y-m-d H:i:s', $row['createtime'])}</td>
            </tr>
            {/loop}
            </tbody>
        </table>
        {$pager}
    </div>
</div>
{template 'common/footer-gw'}